Common CLI Commands

The table below describes common CLI commands.

Common CLI Commands

Command

Description

| <filter>

Filters a command's output by matching the filter string or expression, and thereby displaying only what you need. The syntax includes the command, the vertical bar (|) and the filter expression:

<command>|<filter string or expression> 

The filter expression can be:

include <string>: Filters the output to display only lines with the string, for example:
# show running-config|include sbc routing ip2ip-routing 1
sbc routing ip2ip-routing 1
exclude <string>: Filters the output to display all lines except the string.
grep <options> <expression>: Filters the output according to common options ("-v" and "-w") of the global regular expression print ("grep") UNIX utility.
"-v": Excludes all output lines that match the regular expression. If the "-v" option is not specified, all output lines matching the regular expression are displayed.
"-w": Filters the output lines to display only lines matching whole words form of the regular expression.

For example:

show system version|grep Number
;Serial Number: 2239835;Slot Number: 1
egrep <expression>: Filters the output according to common options of the "egrep" Unix utility.
begin <string>: Filters the output to display all lines starting with the matched string, for example:
# show running-config|begin troubleshoot
  configure troubleshoot
   syslog
    syslog on
    syslog-ip 10.8.94.236
    activate
   exit
   activate
  exit
between <string 1> <string 2>: Filters the output to display only lines located between the matched string 1 (top line) and string 2 (last line). If a string contains a space(s), enclose the string in double quotes. For example, the string, sbc malicious-signature-database 0 contains spaces and is therefore enclosed in double quotes:
# show running-config|between "sbc malicious-signature-database 0" exit
   sbc malicious-signature-database 0
    name "SIPVicious"
    pattern "Header.User-Agent.content prefix 'friendly-scanner'"
    activate
   exit
count: Displays the number of output lines.

| tail <number of lines>

Filters the command output to display a specified number of lines from the end of the output. The syntax includes the command of whose output you want to filter, the vertical bar (|) followed by the tail command, and then the number of lines to display:

<command> | tail <number of lines (1-1000) to display>

Below shows an example where the last five lines of the show running-config command output are displayed:

# show running-config | tail 5
    testcall-id "555"
    activate
   exit
   activate
  exit

activate

Applies (activates) the command setting.

Note:

Offline configuration changes require a reset of the device. A reset can be performed at the end of your configuration changes. A required reset is indicated by an asterisk (*) before the command prompt. To reset the device, use the reload now command (resetting the device by powering off-on the device or by pressing the reset pinhole button will not preserve your new configuration).
The command is applicable to SBC and Gateway functionality.

defaults

Restores the configuration of the currently accessed command set to factory default settings. For example, the below restores the Automatic Update configuration to factory defaults:

(auto-update)# defaults

descending

Displays the command output in descending order, for example:

# show voip calls active descending

Note: Currently, this filter is supported only by certain show commands.

display

Displays the configuration of current configuration set.

do

Runs a command from another unrelated command without exiting the current command set. For example, the command to display all active alarms is run from the current command set for clock settings:

(clock)# do show active-alarms

The example below runs the show running-config command (which displays device configuration) from the current command set for clock settings:

(clock)# do show running-config

exit

Leaves the current command-set and returns one level up. For online parameters, if the configuration was changed and no activate command was entered, the exit command applies the activate command automatically. If entered on the top level, the session ends.

(config-system)# exit
# exit
Connection to host lost.

first <x>

Filters the command output to display the first x number of entries. For example, the following displays only the first two entries:

# show voip calls history sbc first 2

Note: Currently, this filter is supported only by certain show commands.

help

Displays a short help how-to string.

history

Displays a list of previously run commands in the current CLI session in the command history buffer. You can also clear the command history buffer, using the clear history command.

last <x>

Filters the command output to display the last x number of entries. For example, the following displays only the last four entries:

# show voip calls active last 4

Note: Currently, this filter is supported only by certain show commands.

list

Displays a list of the available commands list of the current command-set.

no

Undoes an issued command, disables a feature or deletes a table row. Enter the no before the command, for example:

Disables the debug log feature:
# no debug log
Deletes the table row at Index 2:
<config-voip># no sbc routing ip2ip-routing 2

pwd

Displays the full path to the current CLI command, for example:

(auto-update)# pwd
/config-system/auto-update

quit

Terminates the CLI session.

range <x-y>

Filters the command output to display a range of entries from x to y. For example, the following displays only the entries from 1 to 4:

# show voip calls active range 1-4

Note: Currently, this filter is supported only by certain show commands.

where

Searches a table for a row index that contains a specific value for a specific table column. Use the following format:

<Table> where <Column Name> <Value>

The following example searches the table for a row index whose table column 'name' contains the value "ITSP":

(config-voip)# ip-group where name ITSP
(ip-group-1)#